from dbFileProc_strategy import dbFileProc_strategy

class dbFileProcess:
    file_path = ''
    db_proc_stra = dbFileProc_strategy()
    def __init__(self, path, strategy) -> None:
        self.file_path = path
        self.db_proc_stra = strategy
    def get_matched_sentens(self, word) -> list:
        sentens_l = []
        file = open(self.file_path, encoding='utf-8')
        sentens_l.extend(self.db_proc_stra.process(f=file, word=word))
        file.close()  
        return sentens_l